//package com.pq.config;
//
//import com.zaxxer.hikari.HikariDataSource;
//import io.seata.rm.datasource.DataSourceProxy;
//import io.seata.spring.annotation.GlobalTransactionScanner;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.DependsOn;
//import org.springframework.util.StringUtils;
//
//import javax.sql.DataSource;
//
//import static io.seata.common.Constants.BEAN_NAME_SPRING_APPLICATION_CONTEXT_PROVIDER;
//
//@Configuration
//public class SeataConfig {
////    @Bean
////    public GlobalTransactionScanner globalTransactionScanner(){
////        return new GlobalTransactionScanner("cloud-order", "my_test_tx_group");
////    }
//    @Bean
//    public GlobalTransactionScanner globalTransactionScanner() {
////        String applicationName = this.applicationContext.getEnvironment().getProperty("spring.application.name");
////        String txServiceGroup = this.seataProperties.getTxServiceGroup();
////        if (StringUtils.isEmpty(txServiceGroup)) {
////            txServiceGroup = applicationName + "-fescar-service-group";
////            this.seataProperties.setTxServiceGroup(txServiceGroup);
////        }
//
//        return new GlobalTransactionScanner("cloud-order", "my_test_tx_group");
//    }
//}
